//package com.chixing.service.impl;
//
//import com.chixing.service.IndexService;
//import lombok.extern.slf4j.Slf4j;
//import org.quartz.JobExecutionContext;
//import org.quartz.JobExecutionException;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.scheduling.quartz.QuartzJobBean;
//import org.springframework.stereotype.Service;
//import org.springframework.transaction.annotation.Transactional;
//
//import java.text.SimpleDateFormat;
//import java.util.Date;
//
//
//
///**
// * 点赞的定时任务
// */
//@Slf4j
//@Service
//public class LikeTask extends QuartzJobBean {
//
//    @Autowired
//    private IndexService indexService;
//
//    private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//
//    @Override
//    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
//        log.info("LikeTask-------- {}", sdf.format(new Date()));
//        System.out.println("Redis同步到数据库");
//        //将 Redis 里的点赞信息同步到数据库里
//        indexService.reids2MySql();
//    }
//}
